/*
 * ElementImpl.h
 *
 *  Created on: Apr 19, 2009
 *      Author: wrice
 */

#ifndef ELEMENTIMPL_H_
#define ELEMENTIMPL_H_
#include "DOMCoreImp.h"
namespace DOMCoreImp {

class ElementImp : public NodeImp, IMPLEMENTS( Element ) {
protected:
	friend class DocumentImp;
	ElementImp(DOMString nodeName, DocumentImp * ownerDocument);

public:
	virtual unsigned short getNodeType();

	virtual DOMString getTagName();

	// attribute
	virtual bool hasAttributes();
	virtual NamedAttrMap * getAttributes();

	virtual bool hasAttribute(DOMString name);

	virtual Attr * getAttributeNode(DOMString name);
	virtual Attr * setAttributeNode(Attr * newAttr) throw(DOMExceptionPtr);
	virtual Attr * removeAttributeNode(Attr * oldAttr) throw(DOMExceptionPtr);

	virtual DOMString getAttribute(DOMString name);
	virtual void setAttribute(DOMString name, DOMString value) throw(DOMExceptionPtr);
	virtual void removeAttribute(DOMString name) throw(DOMExceptionPtr);

	virtual NodeList * getElementsByTagName(DOMString name);

	// blocking nodeValue
	virtual DOMString getNodeValue() throw(DOMExceptionPtr);
	virtual void setNodeValue(DOMString) throw(DOMExceptionPtr);

private:
	NamedAttrMapImpPtr attributes_;
};

}

#endif /* ELEMENTIMPL_H_ */
